package com.mybatis05.mapper;

import com.mybatis05.bean.Student;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * @Author: zhaoxb
 * @Date: 2019-08-02 10:03
 * @Version 1.0
 **/
public interface StudentMapper {
    void insertStudent(Student student);

    Student getById(Integer id);

    @Update("update student set name = #{name}, age=#{age} where id = #{id}")
    int update(@Param("student") Student student);

    List<Student> listAll();



}
